# 从模块中导入reduce函数
from functools import reduce

def add(x,y):
    return x+y

list_value = [1,2,3,4,5]

# 写法1
# result = reduce(add,list_value)

# 写法2
result = reduce(lambda x,y:x+y,list_value)


print(result)